package com.five.core.result;

/**
 * Created by shelei on 2024/10/18
 */
public enum ResultEnum {

    REQUEST_SUCCESS(0,"请求成功!"),
    NO_PERMISSION(20000,"没有访问权限!"),
    ID_NOT_EMPTY(20001,"id不能为空!"),
    OPTION_FAIL(20002,"操作失败!"),
    VALIDATE_FAIL(20003,"校验失败!"),
    FILE_TYPE_ERROR(20004,"上传文件的格式不合法!"),
    ADMIN_INFO_NOT_EMPTY(20005,"管理员信息不能为空!"),
    USERNAME_NOT_EMPTY(20006,"用户名或密码错误!"),
    UNKNOWN_EXCEPTION(5000,"对不起，系统繁忙，请稍后再来!"),
    ADD_FALSE(1000,"添加失败"),
    ADD_TRUE(1001,"添加成功"),
    UPDATE_FALSE(1000,"更新失败"),
    UPDATE_TRUE(1001,"更新成功"),
    DELETE_FALSE(1002,"删除失败"),
    DELETE_TRUE(1003,"删除成功"),
    ADMIN_INFORMATION_NOT_EMPTY(1004,"账号必须信息不能为空"),
    ADMIN_INFORMATION_duplicate(1004,"账号必须信息不能重复"),
    TOKEN_IS_NOT_EMPTY(9000,"token不能为空"),
    TOKEN_IS_INVALID(9001,"token格式不正确"),
    TOKEN_IS_NOTVERIFY(9002,"token不合法"),
    TOKEN_IS_EXPIRED(9003,"token已过期"),
    ACCOUNT_IS_UNAVAILBALE(9004,"账号已被禁用"),
    ORDER_AID_ISNULL(9005,"订单的应用id不能为空"),
    APP_ADMINUSER_FALSE(9006,"应用admin用户创建失败"),
    APP_MENU_FALSE(9007,"应用app菜单创建失败"),
    APP_IS_EXPIRE(9008,"您的应用已过期，请自行续费或联系管理员"),
    VALIDATE_FAIL_CODE(9009,"验证码不正确"),
    NOT_HOTEL(8000,"没有该酒店"),
    NOT_HOTEL_VALIDATE(8001,"禁止恶意访问酒店数据"),
    NOT_BANNER_POSITION(8002,"position is null"),
    NOT_PHONE_ENTITY(8003,"手机号不能为空"),
    PHONE_EXIT(8004,"手机号已注册"),
    USER_NAME_HAVE(8005,"用户名已存在"),
    USER_EMAIL_HAVA(8006,"邮箱已存在"),
    CODE_ERROR(8007,"验证码错误"),
    CODE_IS_EMPTY(8008,"验证码过期"),
    TWICE_PASSWORD_IS_NOT_TRUE(8009,"两次密码不一致！"),
    NOT_USER_PHONE(8010,"手机号不存在"),
    LOGIN_ERROR(8011,"登录错误" ),
    CODE_IS_TRUE(8012,"------验证码未失效----"),
    LOGIN_COUNT_EXCEED(8013,"该用户已经超过最大登录数量" ),
    DATA_IS_NULL(8014,"数据为空"),
    PASSWORD_IS_FALSE(8014,"密码错误"),
    ORDER_ISNULL(8040,"订单不能为空"),
    ORDER_ITEM_ISNULL(8050, "订单项不能为空"),
    TOTAL_AMOUNT_NOT_MATCH(8051, "订单总金额与商品明细金额不符"),
    OPERATE_FAIL(8060, "操作失败" ),
    NO_USER_LOGIN(8070, "用户未登录" ),
    TOKEN_EXPIRED_OR_LOGOUT(8071, "token已过期或已登出" ),
    NO_ILLEGAL_DATA(8080, "警告，非法数据" ),
    ORDER_STATUS_NOT_ALLOW_PAY(8090, "订单状态不允许支付" ),
    STOCK_INSUFFICIENT(8091, "库存不足" ),
    ORDER_NOT_EXIST(8092, "订单不存在" ),
    ORDER_STATUS_NOT_ALLOW_RECEIVE(8093, "订单状态不允许收货" ),
    STOCK_OPERATE_FAIL(8094, "库存操作失败" ),
    ORDER_STATUS_NOT_ALLOW_CANCEL(8095, "订单状态不允许取消" ),
    USER_NOT_EXIST(8096, "用户不存在" );


    private Integer code;
    private String message;

    private ResultEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
